home *** CD-ROM | disk | FTP | other *** search
/ Palm Utilities / Palm_Utilities_CD-ROM_2001_2001.iso / files / utils battery / NiMHSet 0.01 / nimhs001.exe / Makefile < prev    next >
Encoding:
Makefile  |  1999-11-14  |  1.5 KB  |  54 lines

  1. #Makefile for gcc PalmPilot crosscompiler m68k-palmos-coff-gcc package.
  2. # Change the strings from APP to BUILDPRC to match your own
  3. # system configuration.
  4. # Place the file into the developping directory.
  5. # "make clean" removes all generated files, even the ".prc".
  6. APP             =nimhset
  7. ICONTEXT        ="NiMHSet"
  8. APPID           =NiMH
  9. RCP             =$(APP).rcp
  10. PRC             =$(APP).prc
  11. SRC             =$(APP).c
  12. GRC             =$(APP).grc
  13. BIN             =$(APP).bin
  14.  
  15. CC              =m68k-palmos-coff-gcc
  16. PILRC           =pilrc
  17. TXT2BITM        =txt2bitm
  18. OBJRES          =m68k-palmos-coff-obj-res
  19. BUILDPRC        =build-prc
  20.  
  21. # uncomment this if you want to build a gdb debuggable version
  22. # -On: n=Optimization-level (0=none), -g: needed for debugging
  23. CFLAGS          =-O2 -fexpensive-optimizations -fomit-frame-pointer $(DEFINES) $(INCLUDES)
  24.  
  25. all:            $(PRC)
  26.  
  27. $(PRC):       grc.stamp bin.stamp;
  28.     $(BUILDPRC) $(PRC) $(ICONTEXT) $(APPID) *.grc *.bin $(LINKFILES) 
  29.     ls -l $(PRC)
  30.  
  31. grc.stamp:    $(APP) ;
  32.     $(OBJRES) $(APP)
  33.     touch $@
  34.  
  35. $(APP):  $(APP).o ;
  36.     $(CC) $(CFLAGS) $(APP).o -o $(APP)
  37.  
  38. resource.h bin.stamp: $(RCP);
  39.     $(PILRC) -L C -H resource.h.new $(RCP)
  40.     if ! diff resource.h.new resource.h 2>/dev/null >/dev/null; then mv resource.h.new resource.h;fi
  41.     touch bin.stamp
  42.  
  43. $(APP).o: $(SRC) resource.h;
  44.     $(CC) $(CFLAGS) -c $(SRC) -o $(APP).o
  45.  
  46. depend dep: ;
  47.     $(CC) -M $(SRC) > .dependencies
  48.  
  49. clean:
  50.     rm -rf *.o $(APP) *.bin *.grc *.prc *.stamp resource.h resource.h.new
  51.  
  52. install: $(PRC)
  53.     /usr/local/pilot/bin/pilot-xfer -i $(PRC)
  54.